<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>promise</title>
    <script>
      let user1 = {
          id:10086,
          name:"ldh",
          age:50
      };
      let user2 = {
          id:10087,
          name:"ldh",
          age:50
      }
      let user3 = {
          id:10089,
          name:"ldh",
          age:50
      }

      let users = new Array();
      users.push(user1);
      users.push(user3);
      users.push(user2);

      //find方法传入一个函数，用来取值，如果函数表达式未true，则返回当前对象
      //主要逻辑还是要遍历数组
      let target = users.find(ele=>ele.id===10066);

      console.log(target);







    </script>
</head>
<body>

</body>
</html>